package com.threadmethod;

/**
 * @PackageName:com.threadmethod
 * @ClassName:Test02
 * @Description:
 * @Author: zhangxiaoyu
 * @date 2020/11/19 14:05
 */
public class Test02 {

    public static void main(String[] args) throws InterruptedException {
        //创建子线程对象
        SubThread02 t2 =new SubThread02();
         t2.setName("t2");
         t2.start();
         Thread.sleep(500);

         //Thread(Runnable)构造方法是Runnable接口，同时传递的实参是接口的实现类对象
         Thread t3 = new Thread(t2);
         t3.start();
    }
}
